package com.gitee.ly.ymorm.executor;

import com.gitee.ly.ymorm.YmOrmConfig;
import com.gitee.ly.ymorm.mapping.ParamMap;
import com.gitee.ly.ymorm.mapping.YmOrmStatement;
import com.gitee.ly.ymorm.transaction.Transaction;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

/**
 * BatchExecutor
 *
 * @author ly
 **/
public class BatchExecutor extends BaseExecutor {
    public BatchExecutor(YmOrmConfig configuration, Transaction transaction) {
        super(configuration, transaction);
    }

    @Override
    protected int doUpdate(YmOrmStatement ymOrmStatement, ParamMap paramMap) throws SQLException {
        return 0;
    }

    @Override
    protected <E> List<E> doQuery(YmOrmStatement ymOrmStatement, ParamMap paramMap, Class<? extends E> resultType) throws SQLException {
        Statement stmt = null;
        try {
            Connection connection = transaction.getConnection();
            Integer timeout = transaction.getTimeout();

        } finally {
            closeStatement(stmt);
        }
    }

}
